package com.lanou.service.impl;

import com.lanou.bean.*;
import com.lanou.mapper.*;
import com.lanou.service.VipInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("VipService")
public class VipInfoServiceImpl implements VipInfoService {

    @Autowired
    private VipInfoMapper vipInfoMapper;

    @Autowired
    private AddrInfoMapper addrInfoMapper;


    @Override
    public List<VipInfo> selectAllVipInfo1(VipInfo vipInfo) {
        return vipInfoMapper.selectAllVipInfo1(vipInfo);
    }

    @Override
    public List<VipInfo> selectAllVipInfo(VipInfo vipInfo) {
        return vipInfoMapper.selectAllVipInfo(vipInfo);
    }

    @Override
    public List<Province> selectAllProvince() {
        return vipInfoMapper.selectAllProvince();
    }

    @Override
    public List<VipInfo> selectAllVipInfo2(VipInfo vipInfo) {
        return vipInfoMapper.selectAllVipInfo2(vipInfo);
    }

    @Override
    public List<City> selectAllCityByProvinceId(int provinceId) {
        return vipInfoMapper.selectAllCityByProvinceId(provinceId);
    }

    @Override
    public int selectProvinceIdByProvince(String province) {
        return vipInfoMapper.selectProvinceIdByProvince(province);
    }

    @Override
    public int selectAddrInfoIdByAddrInfo(String addrInfo) {
        return vipInfoMapper.selectAddrInfoIdByAddrInfo(addrInfo);
    }

    @Override
    public int updateAddrInfo(AddrInfo addrInfo) {
        return vipInfoMapper.updateAddrInfo(addrInfo);
    }

    @Override
    public int updateByPrimaryKeySelective(VipInfo record) {
        return vipInfoMapper.updateByVipNoSelective(record);
    }


    @Override
    public List<AddrInfo> selectAddrInfoByPC(AddrInfo addrInfo) {
        return vipInfoMapper.selectAddrInfoByPC(addrInfo);
    }

    @Override
    public VipInfo selectVipInfoByAP(String vip_account, String password) {
        return vipInfoMapper.selectVipInfoByAP(vip_account,password);
    }

    @Override
    public VipInfo selectVipInfoByVA(String vip_account) {
        return vipInfoMapper.selectVipInfoByVA(vip_account);
    }

    @Override
    public int insertSelective(VipInfo record) {
        return vipInfoMapper.insertSelective(record);
    }

    @Override
    public String selectVipNoByBankCardNo(String bankCardNo) {
        return vipInfoMapper.selectVipNoByBankCardNo(bankCardNo);
    }

    @Override
    public int updateByVipNoSelective(VipInfo record) {
        return vipInfoMapper.updateByVipNoSelective(record);
    }

    @Override
    public int updateByIdSelective(VipInfo record) {
        return vipInfoMapper.updateByIdSelective(record);
    }


    @Autowired
    private CpnUseRecordMapper cpnUseRecordMapper;

    @Override
    public CpnUseRecord selectCpnUseRecordByVipNo(String vipNo) {
        return cpnUseRecordMapper.selectCpnUseRecordByVipNo(vipNo);
    }

    @Autowired
    private CpnInfoMapper cpnInfoMapper;

    @Override
    public CpnInfo selectCpnInfoByCpnNo(String cpnNo) {
        return cpnInfoMapper.selectCpnInfoByCpnNo(cpnNo);
    }

    @Autowired
    private CpnRecordMapper cpnRecordMapper;
    @Override
    public CpnRecord selectCpnRecordByVipNo(String vipNo) {
        return cpnRecordMapper.selectCpnRecordByVipNo(vipNo);
    }

    @Autowired
    private BankInfoMapper bankInfoMapper;
    @Override
    public int updateByPrimaryKeySelective(BankInfo record) {
        return bankInfoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public VipInfo selectVipInfoByIdCard(String idCard) {
        return vipInfoMapper.selectVipInfoByIdCard(idCard);
    }

    @Override
    public String selectMaxVipNo() {
        return vipInfoMapper.selectMaxVipNo();
    }

    @Override
    public int insertSelective(AddrInfo record) {
        return addrInfoMapper.insertSelective(record);
    }

    @Override
    public int selectAddrIdByVipNo(String vipNo) {
        return addrInfoMapper.selectAddrIdByVipNo(vipNo);
    }

    @Override
    public int insertSelective(BankInfo record) {
        return bankInfoMapper.insertSelective(record);
    }

    @Override
    public String selectProvinceByAddrId(int addrId) {
        return vipInfoMapper.selectProvinceByAddrId(addrId);
    }

    @Override
    public String selectCityByAddrId(int addrId) {
        return vipInfoMapper.selectCityByAddrId(addrId);
    }


    @Override
    public String selectProvinceByVipNo(int addrid) {
        return vipInfoMapper.selectProvinceByVipNo(addrid);
    }

    @Override
    public String selectCityByVipNo(int addrid) {
        return vipInfoMapper.selectCityByVipNo(addrid);
    }

    @Override
    public BankInfo selectBankInfoByVipNo(String vipNo) {
        return bankInfoMapper.selectBankInfoByVipNo(vipNo);
    }

    @Override
    public VipInfo selectByPrimaryKey(Integer id) {
        return vipInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public String selectVipNoById(Integer id) {
        return vipInfoMapper.selectVipNoById(id);
    }

    @Override
    public int updateVipInfoPointSumByVipNo(VipInfo vipInfo) {
        return vipInfoMapper.updateVipInfoPointSumByVipNo(vipInfo);
    }


}
